package xjtu.se.articlecommunity.admin.busermanage.dao;

import org.apache.ibatis.annotations.*;
import xjtu.se.articlecommunity.admin.busermanage.dto.User;

import java.util.List;

@Mapper
public interface ManageDao {

    @Select("select * from t_user where u_role = 1")
    List<User> getBUserList();

    @Select("select * from t_user where u_role = 3")
    List<User> getBUserApplyList();

    @Delete("update t_user set u_role = 4 where u_id = #{u_id}")
    void delete(User user);

    @Update("UPDATE t_user SET u_role = 1 WHERE u_id = #{u_id}")
    void newBUser(User user);
}
